<?php
/**
 * 项目分配
 * User: Administrator
 * Date: 2020/4/9
 * Time: 14:54
 */

namespace app\admin\model;

use think\Db;
use think\Model;

class ProjectAssign extends Model
{

    protected $name = 'project_assign';

    public static function findInfoByCondition($condition = [])
    {
        return self::where($condition)->find();
    }

    public static function addRecord($addData)
    {
        $data = $addData;
        $data['createtime'] = time();
        $data['updatetime'] = time();
        return self::create($data);
    }

    public static function findListByCondition($condition = [])
    {
        return self::where($condition)->select();
    }

    public static function saveData($condition = [], $data = [])
    {
        if ($condition && $data) {
            $data['updatetime'] = time();
            return self::where($condition)->update($data);
        }
    }

}